package com.gupaoedu.design.decorator.calcprize;

import java.util.Date;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2018/4/28.
 */
public class SumPrizeDecorator extends Decorator {

    public SumPrizeDecorator(Component component) {
        super(component);
    }

    @Override
    public double calcPrize(String user, Date begin, Date end) {
        double money = super.calcPrize(user, begin, end);
        double prize = 1000000 * 0.001;
        System.out.println(user + "累计的奖金" + prize);
        return money + prize;
    }
}
